<div class="bg-light lter b-b wrapper-md ng-scope">
    <h4 class="m-n font-thin">问题管理</h4>
    <button ui-sref="app.question" class="btn-back btn btn-dark btn-sm btn-rounded">
        返回
    </button>
</div>
<div class="wrapper-md" ng-controller="questionEditCtrl">
    <div class="panel panel-default">
        <div class="panel-heading m-n">
            修改问题信息
        </div>
        <div class="panel-body">
            <form class="form-horizontal" name="questionForm" method="post"  ng-submit="editQuestion()">
                <div class="form-group">
                    <label class="col-sm-2 control-label">类型</label>
                    <div class="col-sm-5">
                        <select name="questionType" class="form-control" ng-model="question.questionTypeId" required>
                            <option  value="{{t.id}}" ng-repeat="t in selectList">{{t.name}}</option>
                        </select>
                    </div>
                    <div class="col-sm-5 form-text" ng-if="questionForm.questionType.$touched">
                        <span class="text text-danger" ng-if="questionForm.questionType.$error.required">问题类型是必选的</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">问题</label>
                    <div class="col-sm-5">
                        <input type="text" name="question" class="form-control" placeholder="请输入问题" ng-model="question.question" required>
                    </div>
                    <div class="col-sm-5 form-text" ng-if="questionForm.question.$touched">
                        <span class="text text-danger" ng-if="questionForm.question.$error.required">问题是必填的</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">答案</label>
                    <div class="col-sm-5">
                        <textarea name="answer" ng-model="question.answer" class="form-control" rows="4" placeholder="请输入答案" required></textarea>
                    </div>
                    <div class="col-sm-5 form-text" ng-if="questionForm.answer.$touched">
                        <span class="text text-danger" ng-if="questionForm.answer.$error.required">答案是必填的</span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <button type="submit" class="btn btn-success">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>




